Skip to content

fix(pubsub): keep subscribe_with_handler retrying and handle errors properly (#1233) - #1388

Open
atharv20s wants to merge 1 commit into
dapr:mainfrom
atharv20s:fix/subscribe-with-handler-1233
Open

atharv20s wants to merge 1 commit into
dapr:mainfrom
atharv20s:fix/subscribe-with-handler-1233

Conversation

@atharv20s

Copy link
Copy Markdown

Fixes #1233

  • Sync & async subscribe_with_handler: catch handler exceptions separately, log them, and respond with TopicEventResponseStatus.retry without reconnecting the stream.
  • Sync & async subscribe_with_handler: retry reconnect_stream() with backoff until it succeeds or the subscription is closed.
  • Async subscribe_with_handler: keep a strong reference to streaming_task, handle StreamCancelledError and stream errors, and await streaming_task in close_subscription() with SUBSCRIPTION_CLOSE_TIMEOUT_SECONDS.
  • Restored test_subscribe_topic_with_handler in tests/clients/test_dapr_grpc_client_async.py.

…roperly (dapr#1233)

Signed-off-by: atharv20s <shuklaatharv2005@gmail.com>
@atharv20s
atharv20s requested review from a team as code owners November 28, 2026 09:32
@CasperGN CasperGN self-assigned this Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] subscribe_with_handler stops silently: async task can die or be collected, sync retry path exits, handler errors reconnect the stream

2 participants